/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author hasnor
 */
@Entity
@Table(name = "akaunFav")
@NamedQueries({
    @NamedQuery(name = "AkaunFav.findAll", query = "SELECT a FROM AkaunFav a")})
public class AkaunFav implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "noKp")
    private Pengguna penggunaFav;
    
//    @Basic(optional = false)
//    @Column(name = "no_akaun")
//    private String noAkaun;
    
    @Basic(optional = false)
    @Column(name = "no_akaun_fav")
    private String noAkaunFav;
    
    @Basic(optional = false)
    @Column(name = "nickname_akaun_fav")
    private String nicknameFav;
    
    @Basic(optional = false)
    @Column(name = "nama_akaun_fav")
    private String namaAkaunFav;
   
    @Embedded
    private InfoAudit infoAudit;
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_akaun")
    private KodAkaun jenisAkaun;

//    @Basic(optional = false)
//    @Column(name = "dimasuk")
//    private String diMasuk;
//    
//    @Basic(optional = false)
//    @Column(name = "dikkini")
//    private String diKemaskini;
//    
//    @Basic(optional = false)
//    @Column(name = "trh_masuk")
//    private Date trkDiMasuk;
//    
//    @Basic(optional = false)
//    @Column(name = "trh_kkini")
//    private Date trkDiKemaskini;
    
    public Integer getId() {
        return id;
    }

    public AkaunFav() {
    }

    public AkaunFav(Integer idAkaun) {
        this.id = idAkaun;
    }

    @Override
    public String toString() {
        return "th.model.AkaunFav[ id=" + id + " ]";
    }

    public Pengguna getPenggunaFav() {
        return penggunaFav;
    }

   

    public String getNoAkaunFav() {
        return noAkaunFav;
    }

    public String getNamaAkaunFav() {
        return namaAkaunFav;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public KodAkaun getJenisAkaun() {
        return jenisAkaun;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setPenggunaFav(Pengguna penggunaFav) {
        this.penggunaFav = penggunaFav;
    }


    public void setNoAkaunFav(String noAkaunFav) {
        this.noAkaunFav = noAkaunFav;
    }

    public void setNamaAkaunFav(String namaAkaunFav) {
        this.namaAkaunFav = namaAkaunFav;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }

    public void setJenisAkaun(KodAkaun jenisAkaun) {
        this.jenisAkaun = jenisAkaun;
    }

    public String getNicknameFav() {
        return nicknameFav;
    }

    public void setNicknameFav(String nicknameFav) {
        this.nicknameFav = nicknameFav;
    }

}
